\hypertarget{class_s_w2_a311___lib_1_1_object_to_byte_array}{\section{S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-Byte\-Array Class Reference}
\label{class_s_w2_a311___lib_1_1_object_to_byte_array}\index{S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-Byte\-Array@{S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-Byte\-Array}}
}


Klasse med metoderne til at skrive objekter til et byte array.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_s_w2_a311___lib_1_1_object_to_byte_array_a318d09b31e3f4972388482260ae97574}{Object\-To\-Byte\-Array} ()
\item 
byte\mbox{[}$\,$\mbox{]} \hyperlink{class_s_w2_a311___lib_1_1_object_to_byte_array_ae86fa1b20b36849c7730d2a0f10a723f}{Serialize\-Object$<$ T $>$} (T object\-To\-Serialize)
\begin{DoxyCompactList}\small\item\em Metoden tager et objekt og serializerer det, hvorefter det returneres i et byte-\/array. \end{DoxyCompactList}\item 
T \hyperlink{class_s_w2_a311___lib_1_1_object_to_byte_array_abdf1206bdce03c6720518d703516e926}{De\-Serialize\-Object$<$ T $>$} (byte\mbox{[}$\,$\mbox{]} byte\-Array)
\begin{DoxyCompactList}\small\item\em Metoden skal have en returtype og et byte array og deserialiserer derefter byte array'et og returnerer det som returtypen. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
Binary\-Formatter \hyperlink{class_s_w2_a311___lib_1_1_object_to_byte_array_a8cebf21ce1fc9a70df740a4716dfbd21}{b\-Formatter} = new Binary\-Formatter()
\begin{DoxyCompactList}\small\item\em Binary\-Formatter instantieres. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Klasse med metoderne til at skrive objekter til et byte array. 

Serialisering er en indbygget funktionalitet i C\#. Biblioteket ligger i \char`\"{}\-System.\-Runtime.\-Serialization\char`\"{} og fungere ved at man omdanner et object til en strøm af bytes der efterfølgende kan skrives til en fil, memory eller over netværket. Når objektet serialiseres gemmes nogle data om objektet som dets type, asembly navn, version og de specifikke fields fra objektet man har valgt at serialisere. Hvilke fields der bliver gemt i byte-\/strømmen styres i de enkelte klasser og bliver derfor uddybet i dem. 

Definition at line 75 of file Serialization.\-cs.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_s_w2_a311___lib_1_1_object_to_byte_array_a318d09b31e3f4972388482260ae97574}{\index{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array}!Object\-To\-Byte\-Array@{Object\-To\-Byte\-Array}}
\index{Object\-To\-Byte\-Array@{Object\-To\-Byte\-Array}!SW2A311_Lib::ObjectToByteArray@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array}}
\subsubsection[{Object\-To\-Byte\-Array}]{\setlength{\rightskip}{0pt plus 5cm}S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-Byte\-Array.\-Object\-To\-Byte\-Array (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_w2_a311___lib_1_1_object_to_byte_array_a318d09b31e3f4972388482260ae97574}


Definition at line 82 of file Serialization.\-cs.



\subsection{Member Function Documentation}
\hypertarget{class_s_w2_a311___lib_1_1_object_to_byte_array_abdf1206bdce03c6720518d703516e926}{\index{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array}!De\-Serialize\-Object$<$ T $>$@{De\-Serialize\-Object$<$ T $>$}}
\index{De\-Serialize\-Object$<$ T $>$@{De\-Serialize\-Object$<$ T $>$}!SW2A311_Lib::ObjectToByteArray@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array}}
\subsubsection[{De\-Serialize\-Object$<$ T $>$}]{\setlength{\rightskip}{0pt plus 5cm}T S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-Byte\-Array.\-De\-Serialize\-Object$<$ T $>$ (
\begin{DoxyParamCaption}
\item[{byte\mbox{[}$\,$\mbox{]}}]{byte\-Array}
\end{DoxyParamCaption}
)}}\label{class_s_w2_a311___lib_1_1_object_to_byte_array_abdf1206bdce03c6720518d703516e926}


Metoden skal have en returtype og et byte array og deserialiserer derefter byte array'et og returnerer det som returtypen. 

Den tager alle slags objekter (T) hvis bare objektet er forberedt til serialisering. 


\begin{DoxyTemplParams}{Template Parameters}
{\em T} & \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em byte\-Array} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}


Definition at line 112 of file Serialization.\-cs.

\hypertarget{class_s_w2_a311___lib_1_1_object_to_byte_array_ae86fa1b20b36849c7730d2a0f10a723f}{\index{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array}!Serialize\-Object$<$ T $>$@{Serialize\-Object$<$ T $>$}}
\index{Serialize\-Object$<$ T $>$@{Serialize\-Object$<$ T $>$}!SW2A311_Lib::ObjectToByteArray@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array}}
\subsubsection[{Serialize\-Object$<$ T $>$}]{\setlength{\rightskip}{0pt plus 5cm}byte \mbox{[}$\,$\mbox{]} S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-Byte\-Array.\-Serialize\-Object$<$ T $>$ (
\begin{DoxyParamCaption}
\item[{T}]{object\-To\-Serialize}
\end{DoxyParamCaption}
)}}\label{class_s_w2_a311___lib_1_1_object_to_byte_array_ae86fa1b20b36849c7730d2a0f10a723f}


Metoden tager et objekt og serializerer det, hvorefter det returneres i et byte-\/array. 

Den tager alle slags objekter (T) hvis bare objektet er forberedt til serialisering. 


\begin{DoxyTemplParams}{Template Parameters}
{\em T} & \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em object\-To\-Serialize} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}


Definition at line 94 of file Serialization.\-cs.



\subsection{Member Data Documentation}
\hypertarget{class_s_w2_a311___lib_1_1_object_to_byte_array_a8cebf21ce1fc9a70df740a4716dfbd21}{\index{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array}!b\-Formatter@{b\-Formatter}}
\index{b\-Formatter@{b\-Formatter}!SW2A311_Lib::ObjectToByteArray@{S\-W2\-A311\-\_\-\-Lib\-::\-Object\-To\-Byte\-Array}}
\subsubsection[{b\-Formatter}]{\setlength{\rightskip}{0pt plus 5cm}Binary\-Formatter S\-W2\-A311\-\_\-\-Lib.\-Object\-To\-Byte\-Array.\-b\-Formatter = new Binary\-Formatter()\hspace{0.3cm}{\ttfamily [private]}}}\label{class_s_w2_a311___lib_1_1_object_to_byte_array_a8cebf21ce1fc9a70df740a4716dfbd21}


Binary\-Formatter instantieres. 



Definition at line 80 of file Serialization.\-cs.



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
S\-W2\-A311\-\_\-\-Lib/\hyperlink{_serialization_8cs}{Serialization.\-cs}\end{DoxyCompactItemize}
